<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<title> Divs </title>
	<script type = "text/javascript">
		function createDiv() {
			dv = document.createElement('div');
			dv.style.position="absolute";       					
			dv.style.top = Math.random() + Math.random() * 10 + Math.random() * 100 + Math.random() * 500 + 'px';
			dv.style.left = Math.random() + Math.random() * 10 + Math.random() * 100 + Math.random() * 1000 + 'px';
			dv.style.width = 100 * Math.random() + 'px';
			dv.style.height = 100 * Math.random() + 'px';
			var red = Math.random() * 1000;
			red = Math.round(red % 256);
			red = red.toString(16);			
			var green = Math.random() * 1000;
			green = Math.round(green % 256);
			green = green.toString(16);			
			var blue = Math.random() * 1000;
			blue = Math.round(blue % 256);
			blue = blue.toString(16);
			dv.style.backgroundColor= "#" + red + green + blue;
			document.body.appendChild(dv)
			return dv;
		}
		
		function showDivs() {			
			document.body.innerHTML = "";
			for(var i = 0; i < 20; i++) {
				document.body.appendChild(createDiv())
			}			
		}
		
		function start()
		{
			setInterval("showDivs()",1000);
			showDivs();
		}
	</script>
</head>
<body onclick = "start()">
	
</body>
</html>